﻿Imports System.Collections.Generic
Imports System.Linq
'eisagvgh dedomenwn dhmiourgia daladi deka gramwn sth bash mas
Public NotInheritable Class SampleDataRepository
    Private Sub New()
    End Sub
    Public Shared Function [Get](ByVal id As Integer) As SampleData
        Return GetAll().SingleOrDefault(Function(x) x.movieID.Equals(id))
    End Function
    Public Shared Function GetAll() As List(Of SampleData)
        Return New List(Of SampleData)() From { _
         New SampleData() With { _
           .movieID = 1, _
           .movieName = "Skyfall", _
           .Year = 2012, _
           .directory = "Sam Mendes", _
           .category = "adventure", _
           .movieStars = 7 _
         }, _
         New SampleData() With { _
           .movieID = 2, _
           .movieName = "Hobbit", _
           .Year = 2012, _
           .directory = "Petter Jackson", _
           .category = "fantasy", _
           .movieStars = 7 _
         }, _
         New SampleData() With { _
           .movieID = 3, _
           .movieName = "The Lord of the Rings: The Fellowship of the Ring", _
           .Year = 2001, _
           .directory = "Petter Jackson", _
           .category = "fantasy", _
           .movieStars = 9 _
         }, _
         New SampleData() With { _
           .movieID = 4, _
           .movieName = "The Lord of the Rings: The Two Towers", _
           .Year = 2002, _
           .directory = "Petter Jackson", _
           .category = "fantasy", _
           .movieStars = 8 _
         }, _
         New SampleData() With { _
           .movieID = 5, _
           .movieName = "The Lord of the Rings: The Return of the King", _
           .Year = 2003, _
           .directory = "Petter Jackson", _
           .category = "fantasy", _
           .movieStars = 9 _
         }, _
          New SampleData() With { _
           .movieID = 6, _
           .movieName = "Twillight", _
           .Year = 2008, _
           .directory = "Bill Condon", _
           .category = "fantasy", _
           .movieStars = 6 _
         }, _
          New SampleData() With { _
           .movieID = 7, _
           .movieName = "Twillight Saga: New Moon", _
           .Year = 2009, _
           .directory = "Bill Condon", _
           .category = "fantasy", _
           .movieStars = 8 _
         }, _
          New SampleData() With { _
           .movieID = 8, _
           .movieName = "Twillight Saga: Eclipse", _
           .Year = 2010, _
           .directory = "Bill Condon", _
           .category = "fantasy", _
           .movieStars = 9 _
         }, _
          New SampleData() With { _
           .movieID = 9, _
           .movieName = "The Lord of the Rings: The Return of the King", _
           .Year = 2003, _
           .directory = "Petter Jackson", _
           .category = "fantasy", _
           .movieStars = 9 _
         }, _
          New SampleData() With { _
           .movieID = 10, _
           .movieName = "Underworld", _
           .Year = 2003, _
           .directory = "Len Wiseman", _
           .category = "fantasy", _
           .movieStars = 5 _
         }}


    End Function
End Class

